<div class="content_box" ng-scrollbars>
	<h1 class="page_tit">智能插座管理</h1>
	<!-- 最多允许5个搜索项 -->
	<div class="operate_area container-fluid">
		<div class="row clearfix">
			<div class="col-sm-4 col-md-3 col-lg-2 input_container clearfix">
				<label class="input_description fl">网关别名:</label>
				<div class="input_box">
					<input type="text" ng-model="searchInfo.gatewayName">
				</div>
			</div>
			<div class="col-sm-4 col-md-3 col-lg-2 input_container clearfix">
				<label class="input_description fl">插座别名:</label>
				<div class="input_box">
					<input type="text" ng-model="searchInfo.socketName">
				</div>
			</div>
			<div class="col-sm-4 col-md-3 col-lg-2 input_container clearfix">
				<label class="input_description fl">插座thingId:</label>
				<div class="input_box">
					<input type="text" ng-model="searchInfo.thingId">
				</div>
			</div>
			<div class="col-sm-4 col-md-3 col-lg-2 input_container clearfix">
				<label class="input_description fl">连接状态:</label>
				<div class="input_box">
					<select ng-model="searchInfo.status">
						<option value="">全部</option>
						<option value="CONNECTED">已连接</option>
						<option value="NOT_CONNECTED">未连接</option>
					</select>
				</div>
			</div>
			<button type="button " class="me-btn fl btn-primary"
				ng-click="gatDataLists('0')"
				has-permission="/v1/socket/getByConditions&GET">
				<i class="iconfont icon-sousuo"></i>搜索
			</button>
			<button type="button" ng-click="resetSearchInfo()"
				class="me-btn fl reset_btn">重置</button>

		</div>
	</div>

	<div class="contents">
		<table class="table my_table">
			<thead>
				<tr>
					<th width="28px"></th>
					<th width="75px">ID</th>
					<th>插座别名</th>
					<th>thingId</th>
					<th>绑定用户</th>
					<th>绑定网关</th>
					<th>状态</th>
					<th>绑定时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in dataLists">
					<td></td>
					<td>{{item.id | limitTo:6}}</td>
					<td>{{item.socketName}}</td>
					<td>{{item.thingId}}</td>
					<td>{{item.user.nickName}}</td>
					<td>{{item.intelligentGateway.gatewayName}}</td>
					<td>{{item.status=="CONNECTED"?"已连接":"未连接"}}</td>
					<td>{{item.bindTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
					<td><a class="op_item" ng-if="item.intelligentGateway"
						ng-click="openRelation(item.intelligentGateway.id,item.id)">查看关系</a>
						<a class="op_item" ng-click="openQrcode(item.thingId)">二维码</a>
					</td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td>
						<!--<input type="checkbox">-->
					</td>
					<td colspan="11">
						<!-- 批量操作 -->
						<div class="batch_operate_area clearfix fl"></div>
						<nav class="fr pagination_box">
							<p class="pagination_total fl">共 {{pageParams.totalItems}}
								条数据，每页 {{pageParams.itemsPerPage}} 条，共 {{pageParams.totalPages}}
								页</p>
							<ul ng-if="pageParams.totalItems" uib-pagination
								boundary-links="true" total-items="pageParams.totalItems"
								ng-model="pageParams.currentPage" class="pagination-sm"
								items-per-page="pageParams.itemsPerPage"
								max-size="pageParams.maxSize" previous-text="&lsaquo;"
								next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"
								ng-change="gatDataLists()"></ul>
						</nav>
					</td>
					<td></td>
				</tr>
			</tfoot>
		</table>
	</div>
</div>
